//
//  StarRatingCell.m
//  cityStar
//
//  Created by joyban on 14-12-25.
//  Copyright (c) 2014年 tiny. All rights reserved.
//

#import "StarRatingCell.h"

@implementation StarRatingCell

+(CGFloat)heightOfTableCell
{
    return 40;
}

-(void)configWithCredit:(NSInteger)credit
{
    switch (credit) {
        case 1:
        {
            self.starImage.hidden = NO;
            self.starImage02.hidden = YES;
            self.starImage03.hidden = YES;
            self.starImage04.hidden = YES;
            self.starImage05.hidden = YES;
        }
            break;
        case 2:
        {
            self.starImage.hidden = NO;
            self.starImage02.hidden = NO;
            self.starImage03.hidden = YES;
            self.starImage04.hidden = YES;
            self.starImage05.hidden = YES;
        }
            break;
        case 3:
        {
            self.starImage.hidden = NO;
            self.starImage02.hidden = NO;
            self.starImage03.hidden = NO;
            self.starImage04.hidden = YES;
            self.starImage05.hidden = YES;
        }
            break;
        case 4:
        {
            self.starImage.hidden = NO;
            self.starImage02.hidden = NO;
            self.starImage03.hidden = NO;
            self.starImage04.hidden = NO;
            self.starImage05.hidden = YES;
        }
            break;
        case 5:
        {
            self.starImage.hidden = NO;
            self.starImage02.hidden = NO;
            self.starImage03.hidden = NO;
            self.starImage04.hidden = NO;
            self.starImage05.hidden = YES;
        }
            break;
            
        default:
            break;
    }
}

- (void)awakeFromNib {
    // Initialization code
    self.starImage.hidden = YES;
    self.starImage02.hidden = YES;
    self.starImage03.hidden = YES;
    self.starImage04.hidden = YES;
    self.starImage05.hidden = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
